import axios from 'axios'
import { Message } from '@arco-design/web-vue';

 var instance = axios.create({
    baseURL: '',
    timeout: 1000,
    headers: {'Content-Type': 'application/json'}
  });

  export default instance

  instance.interceptors.response.use(
    (resp)=>{
      // console.log(resp)
      return resp.data
    },
    (error) =>{
      console.log(error)
      // let msg = error.response.data.Message
      // console.log(msg)
      return Promise.reject(error.response.data),
      Message.error(`登录失败: ${error}`)
    }
  )
  
  